import unittest

import ddt

from Base.BaseSetings import TestData_dir
from Business.Employ_Management_SHL import Employ_Management
@ddt.ddt
class employ_management(unittest.TestCase):
    @classmethod
    # def setUpClass(cls) -> None:
    #     cls.ru=Employ_Management()

    def setUp(self) -> None:
        self.ru = Employ_Management()
    # def tearDown(self) -> None:
    #     pass

    # @classmethod
    # def tearDownClass(cls) -> None:
    #     cls.ru.close_Brower()

    # def test_case_001(self):
    #     result=self.ru.login("WNCD000","woniu123")
    #     self.assertEqual("成都 . 研发部 . 超级管理员",result)
    #
    #
    # @ddt.file_data(TestData_dir+"add_company.yaml")
    # def test_case_002(self,**kwargs):
    #     result=self.ru.add_company(kwargs.get("company"),kwargs.get("industry"),kwargs.get("address"),kwargs.get("name"),kwargs.get("phone"))
    #     print(result)
    #
    #     self.assertIn("华为信息科技有限公司",result[0])
    #     self.assertIn("王小姐",result[0])



    def test_case_003(self):
        result=self.ru.search_company("成都","WNCDC_2901","测试")
        print(result)
        for i in result:
            print(i)
            self.assertEqual(i[3],"测试")

    # def test_case_004(self):
    #     result=self.ru.add_join_company("成都","WNCDC_2901","测试","测试工程师","15000","阿里巴巴")
    #     print(result)
    #     for i in result:
    #         # print(i)
    #         a=(i[-1].split("\n")[-1])
    #         self.assertEqual(a,"提交新增")

    # def test_case_005(self):
    #     result=self.ru.search_company_client("阿里巴巴")
    #     print(result)
    #     self.assertEqual(result[0][0],"阿里巴巴")
    #
    # def test_case_006(self):
    #     result=self.ru.modification("阿里巴巴","李小姐")
    #
    #     print(result)
    #     self.assertEqual(result[0][2],"李小姐")
















if __name__ == '__main__':
    # unittest.main()
    ad=employ_management()
    ad.test_case_001()